package com.justech.mes.v2.service.offline;

/**
 * Processing before starting work。
 * <p>
 * <strong>Responsibility chain model</strong>
 * Necessary actions need to be done before starting work.：<br/>
 * 1、Check if the user is working in another position: If so, it will help him finish his current job.
 * 2.This is a manual chain of responsibilities. If you want to do more, please plan ahead. Then invoke Method{doSomething}
 * </p>
 * <warning>
 * Once the end of the responsibility chain is not well controlled, recursion will occur.
 * <p>
 * At the very least, the system stops working. <br/>
 * This is also our recommendation to set up the next processor manually.
 * <p>
 *
 * </warning>
 *
 * @author feifei.li
 */
public abstract class AbstractMesJobRegisterBefore<T> implements MesJobRegisterBefore {

    /**
     * Next Processor in Responsibility Chain <br/>
     * It's very likely that it's a null pointer, so you need to check it when you refer to it again.
     */
    protected AbstractMesJobRegisterBefore<T> next;

    /**
     * If you want to do something else after last night's event,
     * Then hand over your clerk.
     *
     * @param next Next Processor
     */
    @Override
    public MesJobRegisterBefore next(AbstractMesJobRegisterBefore next) {
        this.next = next;
        return next;
    }

}
